import os

from aab.utils import SheetData

sheet = SheetData(os.path.expanduser('~/tmp/demo.xlsx'))
header_format1 = sheet.add_format(sheet.default_header_format_options, row_span=2)
header_format2 = sheet.add_format(sheet.default_header_format_options, col_span=3)

sheet.write(0, 0, '姓名', header_format1)
sheet.write(0, 1, '年龄', header_format1)

sheet.write(0, 2, '家庭成员', header_format2)
sheet.write_header(1, 2, '姓名，来个超长字符串老师的积分拉克丝京东方沙拉酱豆腐')
sheet.write_header(1, 3, '性别')
sheet.write_header(1, 4, '年龄')

sheet.write(2, 0, '测试')
sheet.write(2, 1, 15)
sheet.write(2, 2, 'sdf')
sheet.write(2, 3, 'sdfkj')
sheet.write(2, 4, 'lkjdf')
sheet.write_to_xlsx()
